styleproperty: Move pspec to GtkCssStyleProperty
authorBenjamin Otte <otte@redhat.com>
Sun, 1 Jan 2012 23:28:56 +0000 (00:28 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Jan 2012 17:37:53 +0000 (18:37 +0100)
shorthands don't use pspecs anymore.

gtk/gtkcsscustomproperty.c
gtk/gtkcssstylepropertyprivate.h
gtk/gtkstyleproperties.c
gtk/gtkstyleproperty.c
gtk/gtkstylepropertyprivate.h

index ab0ec9eb96150d8afcf79a769698fc85bb1c26c0..1175af3e63883e076d411ed3c03eb45df081dda8 100644 (file)
@@ -126,7 +126,7 @@ gtk_theming_engine_register_property (const gchar            *name_space,
                        "name", name,
                        "value-type", pspec->value_type,
                        NULL);
-  node->pspec = pspec;
+  GTK_CSS_STYLE_PROPERTY (node)->pspec = pspec;
   node->property_parse_func = parse_func;
 
   g_value_unset (&initial);
@@ -161,7 +161,7 @@ gtk_style_properties_register_property (GtkStylePropertyParser  parse_func,
                        "name", pspec->name,
                        "value-type", pspec->value_type,
                        NULL);
-  node->pspec = pspec;
+  GTK_CSS_STYLE_PROPERTY (node)->pspec = pspec;
   node->property_parse_func = parse_func;
 
   g_value_unset (&initial);
@@ -196,7 +196,7 @@ gtk_style_properties_lookup_property (const gchar             *property_name,
   if (GTK_IS_CSS_CUSTOM_PROPERTY (node))
     {
       if (pspec)
-        *pspec = node->pspec;
+        *pspec = GTK_CSS_STYLE_PROPERTY (node)->pspec;
 
       if (parse_func)
         *parse_func = node->property_parse_func;
index aba791c6666d3d209db72722b192487ab81775b5..de84786d83e08fbe75d42ea130e815156260cfb0 100644 (file)
@@ -41,6 +41,7 @@ struct _GtkCssStyleProperty
 
   GValue initial_value;
   guint id;
+  GParamSpec *pspec;
   guint inherit :1;
 };
 
index 0431905b1ddd50896cf01bd39de5f85e97c130cf..4919699fac83dd771324b7b15aa7a48448d58247 100644 (file)
@@ -485,7 +485,7 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties  *props,
 
   g_value_copy (value, val);
   if (_gtk_style_property_get_value_type (GTK_STYLE_PROPERTY (style_prop)) == G_VALUE_TYPE (value))
-    g_param_value_validate (GTK_STYLE_PROPERTY (style_prop)->pspec, val);
+    g_param_value_validate (style_prop->pspec, val);
 }
 
 /**
index b444cf104a85e6908cb3b4995a553b793c717efb..de852ea3e36efaf4add25497631268c166adabd8 100644 (file)
@@ -954,7 +954,7 @@ _gtk_style_property_register (GParamSpec               *pspec,
                        "value-type", pspec->value_type,
                        NULL);
   g_assert (node->value_type == pspec->value_type);
-  node->pspec = pspec;
+  GTK_CSS_STYLE_PROPERTY (node)->pspec = pspec;
   node->property_parse_func = property_parse_func;
   node->parse_func = parse_func;
   node->print_func = print_func;
index 7b7b60bbec6b471dbc116dd017ee3df1dc50708c..73bd23fe750b97fd7c07764ee574845b941203ff 100644 (file)
@@ -58,8 +58,6 @@ struct _GtkStyleProperty
   char *name;
   GType value_type;
 
-  GParamSpec               *pspec;
-
   GtkStylePropertyParser    property_parse_func;
   GtkStyleUnpackFunc        unpack_func;
   GtkStylePackFunc          pack_func;